package thread;

public class ThreadDemo21 {
    public static void main(String[] args)   {
        Object locker1=new Object();
      synchronized (locker1){
          System.out.println("wait之前");
          try {
              locker1.wait();
          } catch (InterruptedException e) {
              throw new RuntimeException(e);
          }
          System.out.println("wait之后");
      }
    }
}
